AsReadOnly Method

Wintellect PowerCollections

Collapse imageExpand ImageCollapseAll imageExpandAll imageDropDown imageDropDownHover imageCopy imageCopyHover image
[This topic is pre-release documentation and is subject to change in future releases. Blank topics are included as placeholders.]

Provides a read-only view of this dictionary. The returned IDictionary<TKey,TValue> provides a view of the dictionary that prevents modifications to the dictionary. Use the method to provide access to the dictionary without allowing changes. Since the returned object is just a view, changes to the dictionary will be reflected in the view.

Namespace: Wintellect.PowerCollections
Assembly:  PowerCollections (in PowerCollections.dll)

Syntax

C#
public virtual IDictionary<TKey, TValue> AsReadOnly()
Visual Basic (Declaration)
Public Overridable Function AsReadOnly As IDictionary(Of TKey, TValue)
Visual C++
public:
virtual IDictionary<TKey, TValue>^ AsReadOnly ()

Return Value

An IIDictionary<TKey,TValue> that provides read-only access to the dictionary.

See Also